<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>我的模板</title>

</head>

<body>


    <div id="app">
        <cpn>
            <span>嗡嗡嗡</span>
        </cpn>
        <cpn>
            <span>嘻嘻嘻</span>
        </cpn>
        <cpn>
            <button>啦啦啦</button>
        </cpn>
        <cpn>
        </cpn>
        <cpn>
        </cpn>
        <cpn>
        </cpn>


    </div>


</body>


<template id="cpns">
  <div>
    <span>啦啦啦</span>
    <slot><button>按钮</button></slot> 
  </div>
</template>

<script src="https://cdn.bootcss.com/vue/2.6.11/vue.js"></script>
<script>
    const app = new Vue({
        el: '#app',
        data: {

        },
        components: {
            cpn: {
                template: '#cpns',


            }
        }
    })
</script>